package com.clouddisk.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.clouddisk.common.core.domain.entity.CommonFile;
import com.clouddisk.system.domain.vo.CommonFileListVo;
import com.clouddisk.system.domain.vo.CommonFileUser;
import com.clouddisk.system.mapper.CommonFileMapper;
import com.clouddisk.system.service.ICommonFileService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RequiredArgsConstructor
@Service
public class CommonFileServiceImpl extends ServiceImpl<CommonFileMapper, CommonFile> implements ICommonFileService {

    @Resource
    CommonFileMapper commonFileMapper;

    @Override
    public List<CommonFileUser> selectCommonFileUser(Long userId) {
        return commonFileMapper.selectCommonFileUser(userId);
    }

    @Override
    public List<CommonFileListVo> selectCommonFileByUser(Long userId, Long sessionUserId) {
        return commonFileMapper.selectCommonFileByUser(userId, sessionUserId);
    }


}
